let k = 0;
new Promise((resolve, reject) => {
  if (k == 1) {
    resolve("获取成功");
  }
}).then(data => {
  console.log(data);
});
setTimeout(() => {
  k = 1;
}, 10000);
function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}
async function test() {
  console.log("开始");
  await sleep(20000);
  console.log("2秒后执行这里");
}
test();
console.log(123);
export {};
